##
## Makefile for ktrace in /home/matt/Desktop/ktrace
## 
## Made by mathieu1 lornac
## Login   <lornac_a@epitech.net>
## 
## Started on  Thu Dec  9 12:46:20 2010 mathieu1 lornac
## Last update Thu Dec  9 13:55:35 2010 mathieu1 lornac
##

##
# Executable name
##

EXE_NAME = ktrace

##
## SOURCES
##
SRC_DIR	= src
SRCS	= $(SRC_DIR)/main.c	\
	  $(SRC_DIR)/parse.c

SRCS_OBJ	= $(SRCS:.c=.o)

## Compilators path
##
CC_linux	= cc
CC_FreeBSD	= cc
CC_solaris	= /usr/sfw/bin/gcc
CC		= $(CC_${OSTYPE})

INCL		= -I./inc

CFLAGS		= -g3 -W -Wall -O -Wuninitialized -Wstrict-prototypes

RM		= rm -f

##
## RULES
##

.c.o :
	$(CC) -c $(CFLAGS) $(INCL) -o $@ $*.c

all:	$(SRCS_OBJ)
	$(CC) -o $(EXE_NAME) $(SRCS_OBJ) $(INCL)

clean:
	$(RM) $(SRCS_OBJ)
	$(RM) \#*\#
	$(RM) *~
	$(RM) $(SRC_DIR)/*~
	$(RM) $(SRC_DIR)/\#*\#

fclean:	clean
	$(RM) $(SR_NAME)

re:	fclean all
